Repository navigation
Conversation
|
There is probably a bit more work to be done on this but it is quite late for me and I spent far more time on this than I had thought haha. @michaelmess-de, please review the revised semantics and platform behaviour. Will come back to this over the weekend. |
e89f2be to
5b1749b
Compare
|
Thank you for your work. |
|
Future proofing should always be done. Will work on this. |
| /* Keep every append inside the range reserved by the caller. */ | ||
| #define ADD_SERVER_ARG(value) do { \ | ||
| if (ac >= MAX_SERVER_ARGS) { \ | ||
| rprintf(FERROR, "argc overflow in server_options().\n"); \ | ||
| exit_cleanup(RERR_MALLOC); \ | ||
| } \ | ||
| args[ac++] = (value); \ | ||
| } while (0) | ||
|
|
There was a problem hiding this comment.
I would add a comment like
The do-while(0) construct just lets the macro content appear syntactically as one statement. Thus it can be used in statement contexts (such as an if/else) and followed by a semicolon.
to make clear that the do-while(0) construct is there on purpose.
#1011 and the chain before it established proposal(s) and option-design discussion. This PR implements the feature in a bit of a cleaner manner after reviewing that work.
Summary
Adds
--niceand--no-niceto control CPU and I/O scheduling priorities for local and remote rsync processes.Settings can target the local process, remote process or both. CPU and I/O values compose independently and later settings replace only the component they specify. Unsupported or denied local changes produce a warning without terminating the transfer. Daemon clients may request only CPU nice 19, idle I/O priority or both.
rrsyncaccepts only local priority reductions. Local-only settings work with older peers while remote settings require peer support.